package info.mikrotubula.agents;

import info.mikrotubula.db.News;
import info.mikrotubula.managers.NewsManagerLocal;
import java.util.Date;
import java.util.List;
import javax.ejb.EJB;

/**
 *
 * @author Krystian
 */
public class NewsAgent {

    @EJB
    private NewsManagerLocal newsManagerBean;
    private Integer nwsId;
    private String nwsTitle;
    private String nwsHeader;
    private Date nwsDate;
    private String nwsBody;
    private List<News> news;
    
    /** Creates a new instance of NewsAgent */
    public NewsAgent() {
        this.news = (List<News>) newsManagerBean.list();
    }
    
    public void create() {
        News news = new News(nwsTitle,nwsHeader,nwsBody);
    }

    public Integer getNwsId() {
        return nwsId;
    }

    public void setNwsId(Integer nwsId) {
        this.nwsId = nwsId;
    }

    public String getNwsTitle() {
        return nwsTitle;
    }

    public void setNwsTitle(String nwsTitle) {
        this.nwsTitle = nwsTitle;
    }

    public String getNwsHeader() {
        return nwsHeader;
    }

    public void setNwsHeader(String nwsHeader) {
        this.nwsHeader = nwsHeader;
    }

    public Date getNwsDate() {
        return nwsDate;
    }

    public void setNwsDate(Date nwsDate) {
        this.nwsDate = nwsDate;
    }

    public String getNwsBody() {
        return nwsBody;
    }

    public void setNwsBody(String nwsBody) {
        this.nwsBody = nwsBody;
    }

    public List<News> getNews() {
        return news;
    }

    public void setNews(List<News> news) {
        this.news = news;
    }
    
}
